import { post, get, del } from "../util/request";

// 封装加入购物车接口
export const addtocart = (data) => post("/api/v1/shop_carts", data);

// 封装购物车列表
export const reqCartlist = () => get("/api/v1/shop_carts");

// 根据id删除单个购物车商品
export const reqDelectCart = (id) => del("/api/v1/shop_carts/" + id);

// 批量删除购物车商品
export const reqDelectCarts = (ids) =>
  post("/api/v1/shop_carts/delmany", { ids }); // ids:ids
